import { defineStore } from 'pinia';

export const useTokenStore = defineStore('token', {
  state: () => ({
    token: '',  // 初始值为空字符串
  }),

  actions: {
    setToken(newToken: string) {
      this.token = newToken;
    },

    removeToken() {
      this.token = '';
    }
  },

  persist: true
});

